package ys.ewp.po;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @description 任务PO
 */
@Entity
@Table(name="tb_task")
public class Task extends BasePo {
	//任务名称
	private String taskName;
	//任务详细介绍
	private String taskContent;
	//任务规定完成时间
	private Date finishDate;
	//任务最终完成时间
	private Date finalDate;
	//任务派发者
	private Employee allotEmployee;
	//任务等级
	private TaskLevel taskLevel;    
	//任务负责人
	private Employee principal;
	//附件
//	private UploadFile attachment;
	//任务状态
	private TaskStatus taskStatus;
	//任务分数
	private Integer fraction;
	
	
	public String getTaskName() {
		return taskName;
	}
	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}
	public String getTaskContent() {
		return taskContent;
	}
	public void setTaskContent(String taskContent) {
		this.taskContent = taskContent;
	}
	public Date getFinishDate() {
		return finishDate;
	}
	public void setFinishDate(Date finishDate) {
		this.finishDate = finishDate;
	}
	public Date getFinalDate() {
		return finalDate;
	}
	public void setFinalDate(Date finalDate) {
		this.finalDate = finalDate;
	}
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="allot_employee_id")
	public Employee getAllotEmployee() {
		return allotEmployee;
	}
	public void setAllotEmployee(Employee allotEmployee) {
		this.allotEmployee = allotEmployee;
	}
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="task_level_id")
	public TaskLevel getTaskLevel() {
		return taskLevel;
	}
	public void setTaskLevel(TaskLevel taskLevel) {
		this.taskLevel = taskLevel;
	}
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="principal_id")
	public Employee getPrincipal() {
		return principal;
	}
	public void setPrincipal(Employee principal) {
		this.principal = principal;
	}
	//附件------------------------------
//	@ManyToOne(cascade=CascadeType.REMOVE,fetch = FetchType.EAGER)
//	@JoinColumn(name="attachment_id")
//	public UploadFile getAttachment() {
//		return attachment;
//	}
//	public void setAttachment(UploadFile attachment) {
//		this.attachment = attachment;
//	}
	@ManyToOne
	@JoinColumn(name="task_status_id")
	public TaskStatus getTaskStatus() {
		return taskStatus;
	}
	public void setTaskStatus(TaskStatus taskStatus) {
		this.taskStatus = taskStatus;
	}
	public Integer getFraction() {
		return fraction;
	}
	public void setFraction(Integer fraction) {
		this.fraction = fraction;
	}

	
	
	
	
}
